As a semiconductor memory that stores information in accordance with a new principle, a spin transfer magnetic random access memory (MRAM) has recently been proposed. The MRAM comprises magnetic tunnel junction (MTJ) elements serving as memory cells. The memory cell comprises two magnetic layers (ferromagnetic layers) and a nonmagnetic layer formed between the magnetic layers. The MTJ element stores binary 1 or 0 depending on whether the magnetization states of the two magnetic layers, that is, the directions of spins in the two magnetic layers, are parallel or anti-parallel to each other.